import { createRouter, createWebHistory } from "vue-router";

// 定义静态路由信息
const routes = [
    {
        path: "/",
        component: () => import("../views/home/index.vue"),
        children: [
            {
                // 概述页
                path: "/",
                component: () => import("../views/overview/index.vue"),
            },
            {
                // 图集页
                path: "atlas",
                component: () => import("../views/atlas/index.vue"),
            },
            {
                // 图集页
                path: "details",
                component: () => import("../views/atlasDetails/index.vue"),
            }
        ],
    },
    {
        path: "/login",
        component: () => import("../views/login/index.vue")
    },
    {
        path: "/error",
        component: () => import("../views/error/index.vue")
    },
]

// 创建路由对象
const router = createRouter({
    history: createWebHistory(), routes,
})

export default router;